
<?php

if ($this->session->flashdata('message'))
    echo "<div class='message'>" . $this->session->flashdata('message') . "</div>";
echo validation_errors('<div class="error">', '</div>');
echo '</br>';

echo"<table>";
echo"<tr>";
echo"<td>";
echo '</div>';
echo"</td>";
echo"</tr>";
echo"</table>";


echo'<div class="panel panel-default">';
echo '<div class="panel-heading">Horarios de Médico</div>';
echo '<div class="panel-body">';

if ($horarios == null) {
    echo 'No Hay Medicos';
} else {
    echo '<table cellpadding="0" cellspacing="0" border="1" class="table table-striped table-bordered table-condensed table-responsive" id="tblHorarios" width="100%">';
    echo "<thead>\n<tr>\n";
    echo "<th>Hora de Inicio</th><th>Hora Fin</th><th>Agendar Cita</th>\n";
    echo '<tbody class="cp">';
    foreach ($horarios as $fila) {
        $btn_editar = array(
            'class' => 'btn btn-sm btn-primary btn-block',
            'onclick' => 'saltar(' . $fila['id'] . ',' . site_url() . '/especialidad_controller/editar_view' . ')',
            'value' => 'Editar'
        );
        echo "<tr valign='top'>\n";
        echo "<td align='left'>" . $fila['hora_inicio'] . "</td>";
        echo "<td align='left'>" . $fila['hora_fin'] . "</td>";
        echo'<td align="left">';
        echo anchor("cita_medica_controller/agenda/2015/01", 'agendar cita', $btn_editar);
        echo "</tr>\n";
    }
    echo "</tbody></table>";
}
echo '</div></div>';
echo form_close();

?>
